package com.yoooya.base.model.qo;

import java.io.Serializable;
import java.util.Date;

public class BaseQo extends PaginationQo implements Serializable {

	/**
	 * 排序字段 id desc 多个用逗号分割 id desc,createTime asc
	 */
	protected String orderByClause;

	protected String sort;

	protected Date beginTime;

	protected Date endTime;

	/**
	 * 是否相异
	 */
	protected boolean distinct;

	public String getOrderByClause() {
		return orderByClause;
	}

	public void setOrderByClause(String orderByClause) {
		this.orderByClause = orderByClause;
	}

	public boolean isDistinct() {
		return distinct;
	}

	public void setDistinct(boolean distinct) {
		this.distinct = distinct;
	}

	public String getSort() {
		return this.sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	//cjianquan 2019/3/28
	/**
	 <if test="qo.sqlWhere != null and qo.sqlWhere!='' ">
	 <![CDATA[ ${qo.sqlWhere} ]]>
	 </if>
	 */
	private String sqlWhere;//自定义的sql where 语句， 例如：  and status not in (1,2) and ...

	public String getSqlWhere() {
		return sqlWhere;
	}

	public void setSqlWhere(String sqlWhere) {
		this.sqlWhere = sqlWhere;
	}

	public void appendSqlWhere(String sqlWhere){
		if(getSqlWhere()!=null){
			this.sqlWhere = getSqlWhere()+sqlWhere;
		}else{
			setSqlWhere(sqlWhere);
		}
	}


}
